import request from '@/utils/request';

// 退款申请列表
export async function refundIstList(params) {
  const res = await request.get('/api/refundIst/page', { params });
  console.log(res);
  if (res.data.code === 200) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.data.message));
}

export async function refundIstListDelete(id) {
  const res = await request.delete('/api/refundIst/' + id);
  console.log(res);
  if (res.data.code === 200) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.message));
}
//   退款驳回接口
export async function refundIstUpdate(data) {
  const res = await request.put('/api/refundIst/update', data);
  console.log(res);
  if (res.data.code === 200) {
    return res.data.message;
  }
  return Promise.reject(new Error(res.data.data.message));
}
